/**
 * Any CSS included here will be global. The classic template
 * bundles Infima by default. Infima is a CSS framework designed to
 * work well for content-centric websites.
 */

/* You can override the default Infima variables here. */
:root {
  --ifm-color-primary: #2563eb;
  --ifm-color-primary-dark: #1554e0;
  --ifm-color-primary-darker: #1350d4;
  --ifm-color-primary-darkest: #1042ae;
  --ifm-color-primary-light: #3e75ed;
  --ifm-color-primary-lighter: #4a7eee;
  --ifm-color-primary-lightest: #7098f2;
  --ifm-code-font-size: 95%;
  --ifm-navbar-height: 3.5rem;
  --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
  --ifm-navbar-item-padding-vertical: 0.375rem;
  --ifm-navbar-item-padding-horizontal: 1rem;
  --ifm-navbar-item-hover-bg: rgba(241, 245, 249, 1);
  --ifm-navbar-second-background-color: rgba(248, 250, 252, 1);
  --ifm-navbar-button-border-color: rgba(226, 232, 240, 1);
  --ifm-navbar-button-color: rgba(15, 23, 41, 1);
  --ifm-font-family-base: ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans',
    sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    'Noto Color Emoji';
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
html[data-theme='dark'] {
  --ifm-color-primary: #60a5fa;
  --ifm-color-primary-dark: #3e92f9;
  --ifm-color-primary-darker: #2e89f8;
  --ifm-color-primary-darkest: #076deb;
  --ifm-color-primary-light: #82b8fb;
  --ifm-color-primary-lighter: #92c1fc;
  --ifm-color-primary-lightest: #c5defd;
  --ifm-background-color: #020817;
  --ifm-navbar-background-color: #020817;
  --ifm-navbar-shadow: 0 1px 0 0 rgba(30, 41, 59);
  --ifm-toc-border-color: rgba(30, 41, 59);
  --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
  --ifm-navbar-item-hover-bg: rgba(30, 41, 59, 1);
  --ifm-navbar-second-background-color: rgba(30, 41, 59, 1);
  --ifm-navbar-button-border-color: rgba(30, 41, 59, 1);
  --ifm-navbar-button-color: rgb(248, 250, 252);
}

/**
 * Any CSS included here will be global. The classic template
 * bundles Infima by default. Infima is a CSS framework designed to
 * work well for content-centric websites.
 */

/* You can override the default Infima variables here. */
.docusaurus-highlight-code-line {
  background-color: rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 calc(-1 * var(--ifm-pre-padding));
  padding: 0 var(--ifm-pre-padding);
}

[data-theme='dark'] .docusaurus-highlight-code-line {
  background-color: rgba(0, 0, 0, 0.3);
}

input[type='number'] {
  padding: 3px 5px;
  border: 1px #ccc solid;
  line-height: 1.5;
  border-radius: 4px;
}

.navbar {
  box-shadow: none;
  border-bottom: 1px solid var(--ifm-toc-border-color);
}

.navbar__logo {
  width: 120px;
  margin-right: 1.1rem;
}

.navbar__item {
  margin-right: 1rem;
  padding: 0;
}

.navbar__item.navbar__link,
.navbar__items .navbar__link {
  font-size: 10.5pt;
  padding: var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal);
}

.navbar__items .navbar__link {
  display: block;
}

.navbar__items>a:nth-of-type(2) {
  margin-left: auto;
}

.navbar__items>a:last-child {
  margin-right: auto;
}

.prism-code {
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 1rem;
  border-radius: 8px;
  tab-size: 4;
  -moz-tab-size: 4;
}

.footer {
  font-size: 10.5pt;
  padding: 8px;
}

.footer__copyright {
  color: #888;
  font-size: 10pt;
}

.menu__link {
  line-height: 1.5;
  font-size: 10.5pt;
}

article {
  font-size: 0.96em
}

article h1 {
  font-size: 1.8em;
  margin: 20px 0;
}

article h2 {
  font-size: 1.3em;
}

article h3 {
  font-size: 1.1em;
}

article img {
  border: 1px solid #ccc;
  padding: 5px;
  border-radius: 8px;
  width: auto !important;
  height: auto !important;
  max-width: 80%;
}

article table th {
  padding: 5px 10px;
}

article table td {
  padding: 5px 10px;
  font-size: 90%;
}

.form-range {
  width: 100%;
}

/* blogs */
article[itemprop='blogPost'] header h1 {
  font-size: 2.4em;
}

article[itemprop='blogPost'] header h2 {
  font-size: 1.6em;
}

article[itemprop='blogPost'] header h2 a {
  color: var(--ifm-heading-color);
}

.avatar img {
  width: 60px !important;
}

.medium-zoom-overlay,
.medium-zoom-image--opened {
  z-index: 999;
}

.markdown pre code {
  margin: 0px !important;
  width: 100%;
}

.references-navigation {
  font-size: 10pt;
}

div[id^='headlessui-disclosure-panel'] tr td.relative:nth-child(2) {
  position: inherit !important;
}

/* 修正 tabs 样式 */
.markdown li.tabs__item {
  display: inline-flex;
}

@media (max-width: 996px) {
  .navbar__items .gai-navbar-item.navbar__item {
    display: none;
  }
}

.theme-doc-toc-desktop {
  top: calc(var(--ifm-navbar-height) + 1rem + var(--ifm-navbar-height)) !important;
}

.dropdown>.navbar__link:after {
  width: 4px;
  height: 4px;
  border-width: 1px 1px 0 0;
  border-color: currentColor;
  position: relative;
  top: -4px;
  transform: rotate(135deg);
  left: 3px;
}

.gai-navbar-item-home {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid var(--ifm-navbar-button-border-color);
  font-size: 14px;
  height: 32px;
  line-height: 18px;
}

.gai-navbar-item-home:hover {
  background-color: var(--ifm-navbar-button-background-color);
}

.gai-navbar-item-home a {
  color: var(--ifm-navbar-button-color);
  text-decoration: none;
}

.gai-navbar-item-badge {
  position: relative;
  margin-right: 2rem;
}

.gai-navbar-item-badge::after {
  content: 'HOT';
  font-size: 10px;
  color: var(--ifm-color-white);
  background-color: rgba(220, 38, 38, 1);
  border-radius: 4px;
  padding: 2px 4px;
  position: absolute;
  top: 0;
  line-height: 0.75rem;
  left: 74px;
}

.navbar__link--active {
  color: var(--ifm-link-color) !important;
  background-color: var(--ifm-navbar-item-hover-bg);
  border-radius: 8px;
}

@media (max-width: 996px) {
  .gai-navbar-item-home {
    border: none;
    padding: 6px 12px;
  }

  .gai-navbar-item-home a {
    color: var(--ifm-menu-color);
  }
}

/* 修复左侧边栏样式，使其固定不滚动 */
.t-doc__sidebar {
  max-height: calc(100dvh - (var(--ifm-navbar-height) * 2)) !important;
  top: calc(var(--ifm-navbar-height) * 2) !important;
}

.theme-doc-sidebar-container {
  margin-top: calc(-1 * var(--ifm-navbar-height) * 2) !important;
}

.theme-doc-sidebar-container>div>div {
  padding-top: calc(var(--ifm-navbar-height) * 2) !important;
}

.theme-doc-markdown.markdown .anchor {
  scroll-margin-top: calc(var(--ifm-navbar-height) * 2 + 0.5rem);
}

/* 调整文档左侧边栏样式 */
.sidebar-heading.sidebar-group-item__folder {
  margin-top: 16px;
}

.sidebar-group.sidebar-indent-nested .sidebar-group-item .sidebar-heading {
  padding-left: 12px !important;
}

.sidebar-heading-link-title:has(+ .sidebar-heading-link-method) {
  position: relative;
  left: 45px;
}

.sidebar-heading-link-method {
  position: relative;
  left: -204px;
}

.sidebar-heading-link-method .sidebar-heading-type {
  text-align: left !important;
}

.darklight-reference {
  display: none !important;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
  margin: 2rem 1rem;
}

.card {
  background: inherit;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  border: 1px solid #eee;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
  background-color: var(--ifm-navbar-second-background-color);
}

.card__header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card p {
  margin: 0;
}

.menu__caret:before,
.menu__link:after {
  background-size: 1.3rem 1.3rem;
}

table.serverless-api-services tr:nth-child(2n) {
    background-color: unset;
}

table.serverless-api-services tr:hover td{
    background-color: var(--ifm-table-stripe-background);
}